#include <gtest\gtest.h>
#include <Zaf\String\Lettercase.h>



TEST(Lettercase, ToUppercase) {

	std::string str;
	std::wstring wstr;

	str = "123abcXYZ";
	Zaf::String::ToUppercase(str);
	ASSERT_EQ("123ABCXYZ", str);

	wstr = L"123abcXYZ";
	Zaf::String::ToUppercase(wstr);
	ASSERT_EQ(L"123ABCXYZ", wstr);

	const std::string cstr = "123abcXYZ";
	std::string custr = Zaf::String::ToUppercase(cstr);
	ASSERT_EQ("123ABCXYZ", custr);

	const std::wstring cwstr = L"123abcXYZ";
	std::wstring cuwstr = Zaf::String::ToUppercase(cwstr);
	ASSERT_EQ(L"123ABCXYZ", cuwstr);
}



TEST(Lettercase, ToLowercase) {

	std::string str;
	std::wstring wstr;

	str = "123abcxyz";
	Zaf::String::ToLowercase(str);
	ASSERT_EQ("123abcxyz", str);

	wstr = L"123abcxyz";
	Zaf::String::ToLowercase(wstr);
	ASSERT_EQ(L"123abcxyz", wstr);

	const std::string cstr = "123abcxyz";
	std::string custr = Zaf::String::ToLowercase(cstr);
	ASSERT_EQ("123abcxyz", custr);

	const std::wstring cwstr = L"123abcxyz";
	std::wstring cuwstr = Zaf::String::ToLowercase(cwstr);
	ASSERT_EQ(L"123abcxyz", cuwstr);
}